-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the solidus executable and make it rely on just Thor #49
Fix the solidus executable and make it rely on just Thor #49
Conversation
e6da2bf
to
b204200
Compare
require 'thor' | ||
require 'solidus_dev_support/extension' | ||
|
||
class SolidusDevSupport::SolidusCLI < Thor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things:
- Is there a reason for using
class SolidusDevSupport::SolidusCLI
instead of nestingclass SolidusCLI
within amodule SolidusDevSupport
definition? SoliudsCLI
is not compatible with Zeitwerk, which would expect it to be defined atsolidus_c_l_i.rb
. How about renaming it toSolidusCli
? It's a no-brainer and prevents any potential problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do that by default because it keeps everything on a single level of indentation and avoids some constant lookup situations. But I'll expand it and rename the class to SolidusCommand.
In the future I think it's something that should be extracted (to solidus-cli
?) and added as a dependency of the solidus
gem, but that's another story.
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 11 11
=====================================
Hits 11 11 Continue to review full report at Codecov.
|
b204200
to
f0b8fdc
Compare
f0b8fdc
to
1d67dda
Compare
@elia please add a changelog entry for the path bugfix too! 🙏 |
- Let Thor print the help message - Define a base SolidusCLI command that will be the base for `extension` - Define an `extension` command with a generate subcommand, which is also the default - Cleanup the implementation and make it work with both relative and absolute paths
Will make life easier while developing.
1d67dda
to
588d0b5
Compare
Fixes #47
Summary
extension
extension
command with a generate subcommand, which is also the defaultbin/solidus
andbin/rake
for easy development and less typingChecklist